/**
 * Copyright (c) 时间, Tal.Ben 袁东昊 (ydonghao2@gmail.com).
 *
 * 版权
 */
package com.talben.soudian.bean;

import com.talben.soudian.R;
import com.talben.soudian.fragment.viewpagerfragment.ApkViewPagerFragment;


/**
 * @Title: SimpleBackPage.java
 * @Package com.talben.soudian.bean
 * @Description: 简单返回界面
 * @author Tal.Ben
 * @date 2015年6月14日 下午4:24:47
 * @version v1.0
 */
public enum SimpleBackPage {
	
	ALL_APK(1, R.string.apk_list,
            ApkViewPagerFragment.class);

	private int title;
    private Class<?> clz;
    private int value;

    private SimpleBackPage(int value, int title, Class<?> clz) {
        this.value = value;
        this.title = title;
        this.clz = clz;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

    public Class<?> getClz() {
        return clz;
    }

    public void setClz(Class<?> clz) {
        this.clz = clz;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public static SimpleBackPage getPageByValue(int val) {
        for (SimpleBackPage p : values()) {
            if (p.getValue() == val)
                return p;
        }
        return null;
    }
	
}

